import java.io.*;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class 拓扑排序模板洛谷 {
    public static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    public static Read in = new Read();
    public static int MAXN = 100001;
    public static int MAXM = 200001;
    public static int[] head = new int[MAXN];
    public static int[] next = new int[MAXM];
    public static int[] to = new int[MAXM];
    public static int cnt = 1;
    public static int n;
    public static int m;
    public static int[] indegree;
    public static void main(String[] args) throws IOException{
        n = in.nextInt();
        m = in.nextInt();
        indegree = new int[n + 1];
        for (int i = 0; i < m; i++) {
            int a = in.nextInt();
            int b = in.nextInt();
            indegree[b]++;
            //链式前向星添加图
            addEdge(a,b);
        }
        topSort();
    }

    private static void topSort() {
        PriorityQueue<Integer> heap = new PriorityQueue<>((x,y) ->{
            return x - y;
        });
        for (int i = 1; i <= n; i++) {
            if(indegree[i] == 0){
                heap.offer(i);
            }
        }
        while (!heap.isEmpty()){
            int t = heap.poll();
            out.print(t + " ");
            for (int ei = head[t]; ei != 0; ei = next[ei]) {
                if(--indegree[to[ei]] == 0){
                    heap.offer(to[ei]);
                }
            }
        }
        out.close();
    }

    private static void addEdge(int a, int b) {
        next[cnt] = head[a];
        head[a] = cnt;
        to[cnt++] = b;
    }


    public static class Read{
        StringTokenizer st = new StringTokenizer("");
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        String next() throws IOException{
            while (!st.hasMoreTokens()){
                st = new StringTokenizer(bf.readLine());
            }
            return st.nextToken();
        }
        String nextLine()throws IOException{
            return bf.readLine();
        }
        int nextInt() throws IOException{
            return Integer.parseInt(next());
        }
    }
}
